package com.net.xpay.common.domain.partner;

import com.net.common.domain.VersionedDomain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 2020/4/25 21:01

 * id非自增, id = partner.Id
 */
@Getter
@Setter
@NoArgsConstructor
public class PartnerAccount extends VersionedDomain {
    @ApiModelProperty(notes = "剩余的money")
    private Long moneyLeft;

    public static PartnerAccount getInstance(Partner partner) {
        PartnerAccount account = new PartnerAccount();
        account.setId(partner.getId());
        account.setMoneyLeft(0L);
        return account;
    }
}
